/*
 *说明：用户角色表 选择角色信息脚本
 *
 *@author liuxun 2012-03-06
*/

var opeForm;

$(function() {
	opeForm = $('#opeForm');
	$('#okBtn').click(doOk);
});

function doOk() {
	var usr_id = $('#usr_id').val();
	var rows=list.getRows();
	var params = '';
	
	if (rows.length > 0) {
		var ids = [];
		for(var i=0;i<rows.length;i++){
			ids.push(rows[i][0]);
		}
		params = $ .param({'id' : ids}, true);
	}

	showSystemProccessing();
	$.ajax({
		url: 'R_USR_ROLE!doInsert.do?model.usr_id=' + usr_id,
		data: params,
		type: 'post',
		success: function(data){
			removeSystemProccessing();
			showInfoWin('操作成功!', function() {window.close();});
		}
	});
}